package cn.flant.cmd;

import cn.flant.io.tcp.SocketContext;

public class Response extends ParamContent {
	private CommandSocketHandler handler;

	protected void setHandler(CommandSocketHandler handler) {
		this.handler = handler;
	}

	public void write(Object obj) {
		if (obj == null) {
			return;
		}
		handler.write(obj);
	}

	public void close() {
		handler.destroy();
	}

	public SocketContext getSocketContext() {
		return handler.getSocketContext();
	}
}
